package kr.co.mustgo.domain.product;

import java.util.Date;

public class Product {
	private String productCode;	//상품 코드
	private int adultPrice; //성인 요금
	private int kidPrice; //아이 요금
	private String productName; //상품명
	private boolean isGuide; //가이드 여부
	private Date startDate; //출발일
	private Date endDate; //도착일
	private String productFeature; //상품 특징
	private String includeInfo; //포함 사항
	private String excludeInfo; //불포함 사항
	private String meetingPlace; //미팅 장소 
	private String reservationState; //예약 상태
	private int minPeople; //최소 출발 인원
	private int seatNumber; //좌석 수
	private String festivalCode; //축제 코드
	
	public Product(){}

	public Product(String productCode, int adultPrice, int kidPrice,
			String productName, boolean isGuide, Date startDate, Date endDate,
			String productFeature, String includeInfo, String excludeInfo,
			String meetingPlace, String reservationState, int minPeople,
			int seatNumber, String festivalCode) {
		super();
		this.productCode = productCode;
		this.adultPrice = adultPrice;
		this.kidPrice = kidPrice;
		this.productName = productName;
		this.isGuide = isGuide;
		this.startDate = startDate;
		this.endDate = endDate;
		this.productFeature = productFeature;
		this.includeInfo = includeInfo;
		this.excludeInfo = excludeInfo;
		this.meetingPlace = meetingPlace;
		this.reservationState = reservationState;
		this.minPeople = minPeople;
		this.seatNumber = seatNumber;
		this.festivalCode = festivalCode;
	}

	public String getProductCode() {
		return productCode;
	}

	public void setProductCode(String productCode) {
		this.productCode = productCode;
	}

	public int getAdultPrice() {
		return adultPrice;
	}

	public void setAdultPrice(int adultPrice) {
		this.adultPrice = adultPrice;
	}

	public int getKidPrice() {
		return kidPrice;
	}

	public void setKidPrice(int kidPrice) {
		this.kidPrice = kidPrice;
	}

	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	public boolean isGuide() {
		return isGuide;
	}

	public void setGuide(boolean isGuide) {
		this.isGuide = isGuide;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public String getProductFeature() {
		return productFeature;
	}

	public void setProductFeature(String productFeature) {
		this.productFeature = productFeature;
	}

	public String getIncludeInfo() {
		return includeInfo;
	}

	public void setIncludeInfo(String includeInfo) {
		this.includeInfo = includeInfo;
	}

	public String getExcludeInfo() {
		return excludeInfo;
	}

	public void setExcludeInfo(String excludeInfo) {
		this.excludeInfo = excludeInfo;
	}

	public String getMeetingPlace() {
		return meetingPlace;
	}

	public void setMeetingPlace(String meetingPlace) {
		this.meetingPlace = meetingPlace;
	}

	public String getReservationState() {
		return reservationState;
	}

	public void setReservationState(String reservationState) {
		this.reservationState = reservationState;
	}

	public int getMinPeople() {
		return minPeople;
	}

	public void setMinPeople(int minPeople) {
		this.minPeople = minPeople;
	}

	public int getSeatNumber() {
		return seatNumber;
	}

	public void setSeatNumber(int seatNumber) {
		this.seatNumber = seatNumber;
	}

	public String getFestivalCode() {
		return festivalCode;
	}

	public void setFestivalCode(String festivalCode) {
		this.festivalCode = festivalCode;
	}

	@Override
	public String toString() {
		return "Product [productCode=" + productCode + ", adultPrice="
				+ adultPrice + ", kidPrice=" + kidPrice + ", productName="
				+ productName + ", isGuide=" + isGuide + ", startDate="
				+ startDate + ", endDate=" + endDate + ", productFeature="
				+ productFeature + ", includeInfo=" + includeInfo
				+ ", excludeInfo=" + excludeInfo + ", meetingPlace="
				+ meetingPlace + ", reservationState=" + reservationState
				+ ", minPeople=" + minPeople + ", seatNumber=" + seatNumber
				+ ", festivalCode=" + festivalCode + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + adultPrice;
		result = prime * result + ((endDate == null) ? 0 : endDate.hashCode());
		result = prime * result
				+ ((excludeInfo == null) ? 0 : excludeInfo.hashCode());
		result = prime * result
				+ ((festivalCode == null) ? 0 : festivalCode.hashCode());
		result = prime * result
				+ ((includeInfo == null) ? 0 : includeInfo.hashCode());
		result = prime * result + (isGuide ? 1231 : 1237);
		result = prime * result + kidPrice;
		result = prime * result
				+ ((meetingPlace == null) ? 0 : meetingPlace.hashCode());
		result = prime * result + minPeople;
		result = prime * result
				+ ((productCode == null) ? 0 : productCode.hashCode());
		result = prime * result
				+ ((productFeature == null) ? 0 : productFeature.hashCode());
		result = prime * result
				+ ((productName == null) ? 0 : productName.hashCode());
		result = prime
				* result
				+ ((reservationState == null) ? 0 : reservationState.hashCode());
		result = prime * result + seatNumber;
		result = prime * result
				+ ((startDate == null) ? 0 : startDate.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Product other = (Product) obj;
		if (adultPrice != other.adultPrice)
			return false;
		if (endDate == null) {
			if (other.endDate != null)
				return false;
		} else if (!endDate.equals(other.endDate))
			return false;
		if (excludeInfo == null) {
			if (other.excludeInfo != null)
				return false;
		} else if (!excludeInfo.equals(other.excludeInfo))
			return false;
		if (festivalCode == null) {
			if (other.festivalCode != null)
				return false;
		} else if (!festivalCode.equals(other.festivalCode))
			return false;
		if (includeInfo == null) {
			if (other.includeInfo != null)
				return false;
		} else if (!includeInfo.equals(other.includeInfo))
			return false;
		if (isGuide != other.isGuide)
			return false;
		if (kidPrice != other.kidPrice)
			return false;
		if (meetingPlace == null) {
			if (other.meetingPlace != null)
				return false;
		} else if (!meetingPlace.equals(other.meetingPlace))
			return false;
		if (minPeople != other.minPeople)
			return false;
		if (productCode == null) {
			if (other.productCode != null)
				return false;
		} else if (!productCode.equals(other.productCode))
			return false;
		if (productFeature == null) {
			if (other.productFeature != null)
				return false;
		} else if (!productFeature.equals(other.productFeature))
			return false;
		if (productName == null) {
			if (other.productName != null)
				return false;
		} else if (!productName.equals(other.productName))
			return false;
		if (reservationState == null) {
			if (other.reservationState != null)
				return false;
		} else if (!reservationState.equals(other.reservationState))
			return false;
		if (seatNumber != other.seatNumber)
			return false;
		if (startDate == null) {
			if (other.startDate != null)
				return false;
		} else if (!startDate.equals(other.startDate))
			return false;
		return true;
	}
	
}
